<!-- identityPowerEdit -->
<template>
  <div class="identityPowerEdit">
    <el-tabs v-model="active">
      <el-tab-pane label="分润配置" name="commi" v-if="IsSystem != 4">
        <commi
          :alldisabled="alldisabled2"
          :RoleId="RoleId"
          :IsSystem="IsSystem"
          v-if="active == 'commi'"
        ></commi>
      </el-tab-pane>
      <el-tab-pane label="权益配置" name="power" v-if="IsSystem != 3">
        <el-tabs
          v-model="activeName"
          type="border-card"
          v-if="active == 'power'"
        >
          <el-tab-pane label="激活奖励" name="acti">
            <acti
              :alldisabled="alldisabled2"
              :RoleId="RoleId"
              :IsSystem="IsSystem"
              v-if="activeName == 'acti'"
            ></acti>
          </el-tab-pane>
          <el-tab-pane label="激活津贴" name="sellB" v-if="IsSystem != 4">
            <sell
              :alldisabled="alldisabled2"
              :RoleId="RoleId"
              :IsSystem="IsSystem"
              v-if="activeName == 'sellB'"
            ></sell>
          </el-tab-pane>
          <el-tab-pane label="达标奖励" name="promB">
            <standard-b
              :alldisabled="alldisabled2"
              :RoleId="RoleId"
              :IsSystem="IsSystem"
              v-if="activeName == 'promB'"
            ></standard-b>
          </el-tab-pane>
          <el-tab-pane label="达标津贴" name="promA" v-if="IsSystem != 4">
            <standard-a
              :alldisabled="alldisabled2"
              :RoleId="RoleId"
              :IsSystem="IsSystem"
              v-if="activeName == 'promA'"
            ></standard-a>
          </el-tab-pane>

          <el-tab-pane label="推广奖励" name="qualib">
            <promote-b
              :alldisabled="alldisabled2"
              :RoleId="RoleId"
              :IsSystem="IsSystem"
              v-if="activeName == 'qualib'"
            ></promote-b>
          </el-tab-pane>
          <el-tab-pane label="推广津贴" name="promoAllow" v-if="IsSystem != 4">
            <promo-allow
              :alldisabled="alldisabled2"
              :RoleId="RoleId"
              :IsSystem="IsSystem"
              v-if="activeName == 'promoAllow'"
            ></promo-allow>
          </el-tab-pane>

          <el-tab-pane label="管理津贴" name="qualiA" v-if="IsSystem != 4">
            <promote-a
              :alldisabled="alldisabled2"
              :RoleId="RoleId"
              :IsSystem="IsSystem"
              v-if="activeName == 'qualiA'"
            ></promote-a>
          </el-tab-pane>
        </el-tabs>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import commi from './commi.vue'
import acti from './acti.vue'
import standardA from './standardA.vue'
import standardB from './standardB.vue'
import sell from './sell.vue'
import promoteA from './promoteA.vue'
import promoteB from './promoteB.vue'
import promoAllow from './promoAllow.vue'
export default {
  //import引入的组件需要注入到对象中才能使用
  name: 'identityPowerEdit',
  components: { commi, acti, standardA, standardB, sell, promoteA, promoteB, promoAllow },
  data () {
    //这里存放数据
    return {
      activeName: "acti",
      active: "commi",

    };
  },
  props: ['RoleId', 'IsSystem', 'alldisabled2'],
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    handleClick (tab, event) {

    }
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created () {
    if (this.IsSystem == 4) {
      this.active = 'power'

    }
  },
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted () {

  },
  beforeCreate () { }, //生命周期 - 创建之前
  beforeMount () { }, //生命周期 - 挂载之前
  beforeUpdate () { }, //生命周期 - 更新之前
  updated () { }, //生命周期 - 更新之后
  beforeDestroy () { }, //生命周期 - 销毁之前
  destroyed () { }, //生命周期 - 销毁完成
  activated () { }, //如果页面有keep-alive缓存功能，这个函数会触发
}
</script>
//@import url(); 引入公共css类
<style  scoped>
</style>